package bellman_fold

import "fmt"

type tNode struct {
	id string
	weight int
}

func NewNode(id string) INode {
	return &tNode{
		id,MaxWeight,
	}
}

func (me *tNode) ID() string {
	return me.id
}

func (me *tNode) GetWeight() int {
	return me.weight
}

func (me *tNode) SetWeight(w int) {
	me.weight = w
}

func (me *tNode) String() string {
	return fmt.Sprintf("%s(%v)", me.id, me.weight)
}